<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add the blog description for the home/front page.
	$site_description = get_bloginfo( 'description', 'display' );
	if ( $site_description && ( is_home() || is_front_page() ) )
		echo " | $site_description";

	// Add a page number if necessary:
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );

	?></title>

<link href="<?php bloginfo('template_url'); ?>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?php bloginfo('template_url'); ?>/css/tweaks.css" rel="stylesheet" type="text/css" />

<script src="<?php bloginfo('template_url'); ?>/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.cycle.all.2.74.js"></script>
<script>
$('.testi-content').cycle({ 
    fx:     'fade', 
    timeout: 20000, 
    delay:  -2000,
	speed: 500,
	next: ".testi-next",
	prev: ".testi-prev"
});

$(document).ready(function(event){
	$("input#searchsubmit").attr("value","");
	})
</script>



<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<?php
	/* We add some JavaScript to pages with the comment form
	 * to support sites with threaded comments (when in use).
	 */
	if ( is_singular() && get_option( 'thread_comments' ) )
		wp_enqueue_script( 'comment-reply' );

	/* Always have wp_head() just before the closing </head>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to add elements to <head> such
	 * as styles, scripts, and meta tags.
	 */
	wp_head();
?>

</head>
<body>
<div class="mainContainer">
  <div class="header">
    <div class="logoCon"> <a href="index.html"><img src="<?php bloginfo('template_url'); ?>/images/coffee-academy1.jpg" alt="The Coffee Academy" title="The Coffee Academy" border="0" /></a> </div>
    <div class="commonLinks">
      <ul class="commonLinks_ul">
        <li><a href="/" style="background:url(<?php bloginfo('template_url'); ?>/images/homebg.png) no-repeat;">Home</a></li>
        <li><a href="#">About Us</a></li>
        <li><a href="#">Contact Us</a></li>
      </ul>
    </div>
    <div class="searchCon">
      <?php get_search_form(); ?>
    </div>
  </div>
  <div class="slideshowCon">
    <div class="naviCon">
      <ul class="navi">
        <li><a href="/" class="home">Home</a></li>
        <li><a href="#">Coffee</a></li>
        <li><a href="#">Menu</a></li>
        <li><a href="/locations">Locations</a></li>
        <li><a href="#">Gallery</a></li>
        <li><a href="#">Events</a></li>
        <li><a href="/about-us">About Us</a></li>
        <li><a href="#">Contact Us</a></li>
      </ul>
    </div>
    <div class="slideControl"> <a href="#" class="slideControl_prev">&nbsp;</a> <a href="#" class="slideControl_next">&nbsp;</a> </div>
    <div class="slideshow">
      <div class="slide" style="background:url(<?php bloginfo('template_url'); ?>/images/coffee_image1.jpg) no-repeat;"></div>
    </div>
  </div>
  <div class="contentCon">
    <div class="contentCenter">
      <div class="boxCon left">
        <div class="boxIcon"><img src="<?php bloginfo('template_url'); ?>/images/what-brewing.png" /></div>
        <div class="boxHead"><img src="<?php bloginfo('template_url'); ?>/images/whats-brewing-txt.png" style="padding-top:10px;" /></div>
        <br class="clear" />
        <br />
        <div class="boxContent">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</div>
        <div class="readmore"><a href="#" class="readmorebtn">&nbsp;</a></div>
      </div>
      <div class="boxCon right">
        <div class="boxIcon"><img src="<?php bloginfo('template_url'); ?>/images/drinks.png" /></div>
        <div class="boxHead"><img src="<?php bloginfo('template_url'); ?>/images/drinks-txt.png" style="padding-top:30px;" /></div>
        <br class="clear" />
        <br />
        <div class="boxContent">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo.</div>
        <div class="readmore"><a href="#" class="readmorebtn">&nbsp;</a></div>
      </div>
      <div class="boxCon centerBox">
        <div class="boxIcon"><img src="<?php bloginfo('template_url'); ?>/images/food.png" /></div>
        <div class="boxHead"><img src="<?php bloginfo('template_url'); ?>/images/food-txt.png" style="padding-top:30px;" /></div>
        <br class="clear" />
        <br />
        <div class="boxContent">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo.</div>
        <div class="readmore"><a href="#" class="readmorebtn">&nbsp;</a></div>
      </div>
      <br class="clear" />
      <div class="boxCon left">
        <div class="boxIcon"><img src="<?php bloginfo('template_url'); ?>/images/whats-hot.png" /></div>
        <div class="boxHead"><img src="<?php bloginfo('template_url'); ?>/images/whats-hot-txt.png" style="padding-top:30px;" /></div>
        <br class="clear" />
        <br />
        <div class="boxContent">Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores.</div>
        <div class="readmore"><a href="#" class="readmorebtn">&nbsp;</a></div>
      </div>
      <div class="boxCon right">
        <div class="boxIcon"><img src="<?php bloginfo('template_url'); ?>/images/our-journey.png" /></div>
        <div class="boxHead"><img src="<?php bloginfo('template_url'); ?>/images/our-journey-txt.png" style="padding-top:30px;" /></div>
        <br class="clear" />
        <br />
        <div class="boxContent">Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores.</div>
        <div class="readmore"><a href="#" class="readmorebtn">&nbsp;</a></div>
      </div>
      <div class="boxCon centerBox">
        <div class="boxIcon"><img src="<?php bloginfo('template_url'); ?>/images/whats-up.png" /></div>
        <div class="boxHead"><img src="<?php bloginfo('template_url'); ?>/images/whats-up-txt.png" style="padding-top:30px;" /></div>
        <br class="clear" />
        <br />
		
        <!-- WHAT'S UP -->
		<?php
            $querystr = "
            SELECT wposts.* 
            FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
            WHERE wposts.ID = wpostmeta.post_id 
            AND wpostmeta.meta_key = 'whatsup' 
            AND wpostmeta.meta_value = 'yes'
            AND wposts.post_status = 'publish' 
            AND wposts.post_type = 'post' 
            AND wposts.post_date < NOW() 
            ORDER BY wposts.post_date DESC LIMIT 1
            ";
            $whatupNow = $wpdb->get_results($querystr, OBJECT);
        ?>
        
		<?php if ($whatupNow): ?>
			<?php foreach ($whatupNow as $post): ?>
            <?php setup_postdata($post); ?>
	            <div class="boxContent"><?php the_excerpt(); ?></div>
                <div class="readmore"><a href="<?php the_permalink() ?>" class="readmorebtn" title="<?php the_title(); ?>">&nbsp;</a></div>
            <?php endforeach; ?>
        <?php else : ?>
            <div class="boxContent">Not Found</div>
        <?php endif; ?>
      </div>
      <br class="clear" />
      <hr />
    </div>
  </div>
</div>
<div class="f_mainContainer">
  <div class="f_mainCon">
    <div class="f_centerCon">
      <div class="bottomContent left"> <img src="<?php bloginfo('template_url'); ?>/images/cofiacad.jpg" class="left" />
        <div class="content right"> <img src="<?php bloginfo('template_url'); ?>/images/our-mission-txt.jpg" />
          <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.</p>
          <p><img src="<?php bloginfo('template_url'); ?>/images/arrow-red-right.jpg" align="absmiddle" />&nbsp;&nbsp;<a href="#"><strong>Read more</strong></a></p>
        </div>
      </div>
      <div class="testiCon right">
        <div class="tr">
          <div class="tl">
            <div class="br">
              <div class="bl">
                <div class="testi-txt left"><img src="<?php bloginfo('template_url'); ?>/images/testimonials-txt.jpg" /></div>
                <div class="testi-control right"><a href="#" class="testi-prev">&nbsp;</a> <a href="#" class="testi-next">&nbsp;</a></div>
                <div class="testi-content">
                  <div>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.</div>
                  <div>No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.</div>
                </div>
              </div>
            </div>
          </div>	
        </div>
      </div>
      <br class="clear" />
      <br />
    </div>
    <div class="footer"> <span class="left">Copyright 2011 &copy; The Coffee Academy. All rights reserved.</span> <span class="right"> <a href="#">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="#">About Us</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="#">Contact Us</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="#">Privacy Policy</a> </span> </div>
  </div>
</div>
</body>
</html>
